var dept = null;
$(function() {	
	reportSpace="reporter/finished/arm-monthly-finished-product-reporter!";
	fillDepartments("btngroup");
	$("#genRpt").bind("click",function(){
		  var d = $("#usedate").val();
		  
		  $.ajax({
			 "url":reportSpace+"genwithdate",
			 "type":"POST",
			 "data":"usedate="+d,
			 "success":function(data){
				  var url = reportSpace+"pager?page=0&rows=10";
				  doGet(url);
			 }
			 
		  });
	});
	$("div.pagination ul li a").bind("click",function(){
		var page = $(this).attr("page");
		var link = reportSpace+"query?page="+page+"&rows=10";
		doGet(link);	
		
	});
});
function departmentClicked(id,text){
	dept = id;
	$("#deptLabel").html("当前选择部门:"+text);
}